<!-- 数据源管理标签页 -->
<div class="space-y-6">
    <!-- 操作按钮区域 -->
    <div class="flex justify-between items-center">
        <div>
            <h2 class="text-xl font-semibold text-slate-800">数据源管理</h2>
            <p class="text-slate-600 mt-1">管理和配置信访数据源，支持数据库和Excel文件</p>
        </div>
        <div class="flex space-x-3">
            <button onclick="aiAnalysisPage.showAddDatasourceModal()" 
                    class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors">
                <i class="fas fa-plus mr-2"></i>新增数据源
            </button>
            <button onclick="dataSourceManager.loadDatasources()" 
                    class="px-4 py-2 border border-slate-300 text-slate-700 rounded-lg hover:bg-slate-50 transition-colors">
                <i class="fas fa-refresh mr-2"></i>刷新
            </button>
        </div>
    </div>

    <!-- 数据源统计卡片 -->
    <div class="datasource-stats-grid">
        <div class="stat-card total">
            <div class="stat-card-content">
                <div class="stat-card-info">
                    <h3>总数据源</h3>
                    <p class="stat-card-value" id="totalDatasources">0</p>
                </div>
                <div class="stat-card-icon">
                    <i class="fas fa-database"></i>
                </div>
            </div>
        </div>
        
        <div class="stat-card active">
            <div class="stat-card-content">
                <div class="stat-card-info">
                    <h3>已连接</h3>
                    <p class="stat-card-value" id="activeDatasources">0</p>
                </div>
                <div class="stat-card-icon">
                    <i class="fas fa-check-circle"></i>
                </div>
            </div>
        </div>
        
        <div class="stat-card error">
            <div class="stat-card-content">
                <div class="stat-card-info">
                    <h3>异常</h3>
                    <p class="stat-card-value" id="errorDatasources">0</p>
                </div>
                <div class="stat-card-icon">
                    <i class="fas fa-exclamation-triangle"></i>
                </div>
            </div>
        </div>
        
        <div class="stat-card excel">
            <div class="stat-card-content">
                <div class="stat-card-info">
                    <h3>Excel文件</h3>
                    <p class="stat-card-value" id="excelDatasources">0</p>
                </div>
                <div class="stat-card-icon">
                    <i class="fas fa-file-excel"></i>
                </div>
            </div>
        </div>
    </div>

    <!-- 数据源列表 -->
    <div id="datasourceList" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
        <!-- 数据源卡片将通过JavaScript动态渲染 -->
    </div>
</div>